<extend name="Base/common"/>
<block name="body">
  <ul class="breadcrumb search">
    <li><a href="{:U('/')}">首页</a></li>
    <li><a href="{:U('Item/search', array('cid' => $data['cid_1']))}" target="_self">{$data['category']}</a></li>
    <li class="active">{$data['name']}</li>
  </ul>
  <div class="row">
    <div class="col-xs-12 padd0">
      <div class="item-hd">
        <div class="row"> 
          <!-- 商品图片 -->
          <div class="col-xs-6">
            <div class="item-pic" id="J_item_slider">
              <notempty name="data.images_list">
                <div class="bd">
                  <ul>
                    <volist name="data.images_list" id="vo"> 
                      <!--<li><img src="{:get_image_thumb($vo['path'], 600, 600)}" alt=""></li>-->
                      <li><img src="{$vo['path']}" alt=""></li>
                    </volist>
                  </ul>
                </div>
                <div class="hd">
                  <ul>
                    <volist name="data.images_list" id="vo">
                      <li><img src="{:get_image_thumb($vo['path'], 80, 80)}" width="62"></li>
                    </volist>
                  </ul>
                </div>
                <a class="prev" href="javascript:void(0)"><i class="icon icon-arrow-left"></i></a> <a class="next" href="javascript:void(0)"><i class="icon icon-arrow-right"></i></a> </notempty>
            </div>
          </div>
          <!-- 商品名称、属性、规格、价格 -->
          <div class="col-xs-6">
            <div class="item-info clearfix"> 
              <!-- 名称、简介 -->
              <h3>{$data.name} 
                <notempty name="data.subname"><span class="subname text-danger">{$data.subname}</span></notempty>
              </h3>
              <notempty name="label">
              <p>
                <volist name="label" id='lab'>
                <span style="background-color:#F82034;padding:3px 6px;color:#fff;margin-left:2px">{$lab}</span>
                </volist>
              </p>
              </notempty>
              <p class="text-summary">{$data.summary}</p>
              <!--优惠券-->
                
              
              <!-- 价格、规格、数量 -->

              <div class="pane-box"> 
                <notempty name="coupons">
                  <dl class="tm-coupon">
                    <dt class="fl">可用优惠券优惠券</dt>
                    <dd class="fr lq"><span>去领券  <i class="icon icon-youhuiquan"></i></span>  <i class="icon  icon-arrow-right"></i></dd>
                  </dl>
                </notempty>
                <div class="panel">
                <!-- 商品价格 -->
                <if condition="(C('SDP_PRICE_SHOW')==1) AND (!empty(SHOP_SECRET)) AND ($data.sdp gt 0) AND (CONTROLLER_NAME eq 'Item')">
                <dl class="dl-horizontal item price">
                    <dt class="distribution-price">价格：</dt>
                    <dd class="distribution-dd">
                      <div class="left" style="">
                        <span class="text-danger text-lg"><em class="yen">&yen;</em><em class="J_spec_price">{$data.price}</em></span>
                        <del><em class="yen">&yen;</em>{$data.mprice}</del>
                        <span>直播市场价:&yen;{$data.zprice}</span>
                        <span>直播底价:&yen;{$data.zlprice}</span>
                        <span>主播提成:&yen;{$data.zbyprice}元</span>
                        <span>主播提成:&yen;{$data.ztrate}%</span>
                      </div>
                      <div class="right">
                        <div class="right-price">
                            <p>每件返利：<span style="">&yen;<em>{$sdp_fee}</em></span>元</p>
                        </div>
                        <div class="distribution-button <if condition='$is_can_secret eq 0'> button-delate </if> >">
                          <if condition="$is_can_secret eq 1">
                            <a href="javascript:;" class="Z_item_add" data-itemid="{$data.id}"><i class="icon icon-jiahao1"></i><span>加入分销</span></a>
                          <else />
                            <a href="javascript:;" class="Z_item_delete" data-itemid="{$data.id}"><i class="icon icon-jianhao"></i><span>移除分销</span></a>
                          </if>
                        </div>
                      </div>
                  </dd>
                </dl>
              <else />
                <dl class="dl-horizontal item price">
                  <dt>价格：</dt>
                  <dd> <span class="text-danger text-lg"><em class="yen">&yen;</em><em class="J_spec_price">{$data.price}</em></span> <del><em class="yen">&yen;</em>{$data.mprice}</del> </dd>
                </dl>
                  <if condition="$vizprice eq 1 and $data.dqkdh gt 0 and $data.zprice neq '0.00' ">
                  <dl class="dl-horizontal item price">
                    <dt>直播市场价：</dt>
                    <dd> <span class="text-danger text-lm"><em class="yen">&yen;</em><em class="J_spec_price"><b>{$data.zprice}</b></em></span></dd>
                  </dl>
                  </if>
                  <if condition="$vizprice eq 1 and $data.dqkdh gt 0 and $data.zprice neq '0.00' ">
                    <dl class="dl-horizontal item price">
                      <dt>直播源头供应链底价：</dt>
                      <dd> <span class="text-danger text-lm"><em class="yen">&yen;</em><em class="J_spec_price"><b>{$data.zlprice}</b></em></span></dd>
                    </dl>
                  </if>
                  <if condition="$vizprice eq 1 and $data.dqkdh gt 0 and $data.zbyprice neq '0.00' ">
                    <dl class="dl-horizontal item price">
                      <dt>主播提成：</dt>
                      <dd> <span class="text-danger text-lm"><em class="yen">&yen;</em><em class="J_spec_price"><b>{$data.zbyprice}</b></em></span></dd>
                    </dl>
                  </if>
                  <if condition="$vizprice eq 1 and $data.dqkdh gt 0 and $data.ztrate neq '0.00' ">
                    <dl class="dl-horizontal item price">
                      <dt>主插提成：</dt>
                      <dd> <span class="text-danger text-lm"><em class="yen"></em><em class="J_spec_price"><b>{$data.ztrate}%</b></em></span></dd>
                    </dl>
                  </if>


              </if>
                <!-- 优惠信息 -->
                <if condition="$data.show_preferential eq true">
                  <dl class="dl-horizontal preferential">
                    <dt>&nbsp;</dt>
                    <dd>
                      <!-- 第二件折扣 -->
                      <notempty name="data.SecondPieces"> <span>{$data.SecondPieces.name}</span> </notempty>
                      <!-- 老客户立减 -->
                      <gt name="data.fugou_dis_price" value="0"> <span>老客户立减 {$data.fugou_dis_price} 元</span> </gt>
                      <!-- 满减 -->
                      <notempty name="data.manjian"><span>满{$data.manjian.m.0}减{$data.manjian.j.0}</span></notempty>
                    </dd>
                  </dl>
                </if>
              
                <!-- 赠品 -->
                <notempty name="data.send_item"> 
                  <div class="send-item" <if condition="(C('SDP_PRICE_SHOW')==1) AND (!empty(SHOP_SECRET)) AND ($data.sdp gt 0) AND (CONTROLLER_NAME eq 'Item')"> style="top:86px" </if> > <span class="title">
                    <gt name="data.send_min_num" value="1"> 买 {$data.send_min_num} 赠
                      <else/>
                      赠品 </gt>
                    </span>
                    <volist name="data.send_item" id="vv"> <span class="item"><a href="{:U('/Item/detail?id='.$vv['id'])}" target="_blank"><img src="{:get_image_thumb($vv['item_info']['thumb'], 50, 50)}" width="26" title="{$vv.item_info.name} × {$vv.num}" alt="{$vv.item_info.name} × {$vv.num}"/></a></span> </volist>
                  </div>
                </notempty>

                <if condition="C('IS_SHOW_BUYNUM')">
                  <dl class="dl-horizontal item">
                    <dt>销量：</dt>
                    <dd><em class="text-danger">{$data['buynum']}</em> 人已购买</dd>
                  </dl>
                </if>
                
                <!-- 商品规格 -->
                <notempty name="data.property.property_specifiction">
                  <div class="skubox_lists" id="J_skubox_lists">
                    <p class="tips">请选择您要的商品信息<a href="javascript:;" class="close" id="J_skubox_close"><i class="icon icon-close"></i></a></p>
                    <volist name="data.property.property_specifiction" id="spc" key="spc_key">
                      <dl class="dl-horizontal item sku-box J_sku_box">
                        <dt>{$spc.cname}：</dt>
                        <notempty name="spc.info">
                          <dd>
                            <ul class="clearfix spec-lists J_spec_item <in name='spc.formtype' value='checkbox'>text</in> <in name='spc.formtype' value='color,image'>color</in>">
                              <volist name="spc.info" id="val">
                                <li title="{$val['option']}" class="choose J_sale_prop" data-key="{$spc_key}" data-code="{$val['code']}" args="key[{$val['code']}]={$spc.cname}&val[{$val['code']}]={$val['option']}&code[{$spc_key}]={$val['code']}"> <a href="javascript:;" style="width:42px">
                                  <switch name="spc.formtype">
                                    <case value="color">
                                      <notempty name="val.item_pic"> <img class="cloudzoom-gallery" src="__ROOT__{:get_image_thumb($val['item_pic'], 100, 100)}">
                                        <else/>
                                        <notempty name="val.pic"> <img src="__ROOT__{$val.pic|get_cover='path'}" title="{$val['option']}" />
                                          <else/>
                                          <i style="display: block;width: 36px;height:36px;background:{$val['color']}"></i> </notempty>
                                      </notempty>
                                    </case>
                                    <case value="image"> <img src="__ROOT__{$val.pic|get_cover='path'}" alt="{$val['option']}" title="{$val['option']}" /> </case>
                                    <default/>
                                    {$val['option']} </switch>
                                  <span>已选中</span> </a> </li>
                              </volist>
                            </ul>
                          </dd>
                        </notempty>
                      </dl>
                    </volist>
                  </div>
                </notempty>
                <!-- 商品数量 -->
               <dl class="dl-horizontal item num">
                  <dt>数量：</dt>
                  <dd> <a href="javascript:;" class="minus disabled J_quantity_act" data-option="minus"><i>-</i></a>
                      <if condition="$data['is_seckill'] eq 1 "><input type="input"  value="1" id="J_item_quantity" disabled="disabled" pattern="[0-9]*" min="1">
                        <else/> <input type="input" id="J_item_quantity" value="1" pattern="[0-9]*" min="1"></if>
                    <a href="javascript:;" class="plus J_quantity_act {$data['quota_num'] == 1 ? 'disabled' : ''}" data-option="plus"><i>+</i></a> <span class="stock"> 库存 <em class="J_spec_quantity">{$data.stock}</em> 件
                    <notempty name="data.quota_num"> （{$data.id|quota_text}限购 <span class="text-danger J_quota_num">{$data.quota_num}</span> 件） </notempty>
                    </span> </dd>
                </dl>
                <!-- 运费 -->
                <dl class="dl-horizontal item deliver">
                  <dt>运费：</dt>
                  <dd> 由<strong>{$store['store_name']|default='平台'}
                    </strong>发货并提供售后服务 <span class="delivery_free text-danger">
                    <php>$a_pr = get_store_free_amount($data['store_id']);</php>
                    <gt name="a_pr" value="0"> （满{$data.store_id|get_store_free_amount}元包邮）
                      <else/>
                      {$data.id|get_store_item_freight}
                    </gt>
                    <notempty name="data.SecondPieces"> （限购2件） </notempty>
                    </span> 
                    <!--(仅限西安三环以内)--> 
                  </dd>
                </dl>
                <input type="hidden" id="J_item_id" name="item_id" value="{$data.id}">
                <input type="hidden" id="J_item_price" name="price" value="{$data.price}">
                <!-- 第二件打折，限购2件 -->
                <notempty name="data.SecondPieces">
                  <input type="hidden" id="J_item_stock" data-stock="2" value="2" />
                  <else/>
                  <input type="hidden" id="J_item_stock" value="{$data.stock}" />
                </notempty>
                <input type="hidden" id="J_item_image" value="{$data.cover_path}">
                <input type="hidden" id="J_item_spec" name="specifiction" value="">
                <input type="hidden" id="J_item_code" name="item_code" value="{$data.number}">
                <input type="hidden" id="J_sdp_code" name="sdp_code" value="{$_GET['sdp_secret']}">
              </div>
              </div>
              <!-- 购买按钮 -->
              <div class="buy clearfix">
                <if condition="$data['seckill']"> <span class="item seckill-box text-center J_seckill_time"> 秒杀活动已结束 </span> <span class="item"><a href="javascript:;" class="btn btn-block btn-positive disabled J_seckill_btn"><i class="icon icon-recharge"></i>立即抢购</a></span>
                  <else />
                  <gt name="data.stock" value="0"> <span class="item"><a href="javascript:;" class="btn btn-block btn-positive J_item_buynow"><i class="icon icon-recharge"></i>立即购买</a></span> <span class="item"><a href="javascript:;" class="btn btn-block btn-negative add2cart J_item_add2cart"><i class="icon icon-cart"></i>加入购物车</a></span>
                    <else/>
                    <span class="item"><a href="javascript:;" class="btn btn-positive disabled"><if condition='$zone_out'>该地区暂时无货<else />卖光……</if></a></span> <span class="item"><a href="{:U('/Item/search')}" class="btn btn-block">其它</a></span> </gt>
                </if>

              </div>

              <!-- 微信二维码 -->
              <div class="wechat" style="width:250px;float:left"> <img src="__ROOT__/Uploads/QRcode/Item/{$data['id']}.png" width="100" height="100" alt="">
                <h4><i class="icon icon-wechat"></i>微信扫购</h4>
                <p>一键购买，快捷无忧！</p>
              </div>
              <if condition="($recommended_store eq 1) OR ($search_shops eq 1)">
              <php>$zone_price = C('START_POSITION');</php>
              <if condition="$zone_price">
                  <!-- 本市其他商家 新增的-->
              <div style="margin-top:20px;position:absolute;float: right;padding: 5px 12px;background-color: #fff;position: relative;border-radius: 3px;border: 1px solid #F82034;" class="clearfix">
                <span style="height:24px;line-height:24px;"><a style="color: #F82034;" href="{:U('Index/searchShop/id/'.$data['id'])}">查看本市其他商家</a></span>
              </div>
              </if>
              </if>
              <!-- 社会化分享 -->
              <div class="share clearfix"> <span class="pull-left text-share">分享到：</span> <a href="http://service.weibo.com/share/share.php?url={$meta_share.link}&title={$data.name}&pic=http://shop.shante.me/__IMG__/logo-avatar.png" class="item" title="分享到新浪微博" target="_blank"><i class="icon icon-share-weibo"></i></a> <a href="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={$meta_share.link}&title={$data.name}&pics=http://shop.shante.me/__IMG__/logo-avatar.png" class="item" title="分享到QQ空间" target="_blank"><i class="icon icon-share-qzone"></i></a> <a href="http://www.jiathis.com/send/?webid=weixin&url={$meta_share.link}&title={$data.name}" class="item" title="分享到微信" target="_blank"><i class="icon icon-share-weixin"></i></a>
                <div class="fav-add"> <a href="javascript:;" data-id="{$data.id}" id="J_item_{$data.id}" class="J_add_fav">
                  <eq name="data.is_fav" value="1"> <i class="icon icon-like-fill"></i> 已收藏
                    <else/>
                    <i class="icon icon-like"></i> 加入收藏 </eq>
                  </a> </div>

              </div>
            <!-- 发布到 -->
            <div class="fabu clearfix" style="clear:both"> <span class="pull-left text-share">发布到：</span>
              <a class="item" title="发布到抖音小店"  href="javascript:void(0)" data-action="https://fxg.jinritemai.com/ffa/g/create" data-site="douyin">抖音</a>
              <a class="item" title="发布到微店"  href="javascript:void(0)" data-action="https://channels.weixin.qq.com/shop/goods/category" data-site="weixin">微店</a>
              <a class="item" title="发布到TikTop" href="javascript:void(0)"  data-site="tiktop">TikTop</a>
              <a class="item" title="发布到shopee"  href="javascript:void(0)" data-action="https://seller.shopee.cn/portal/product/mtsku/new"  data-site="shopee">shopee</a>
              <a class="item-2" title="复制链接"  href="javascript:void(0)" id="copyurl">【复制商品链接】</a>

            </div>
            <script src="//code.jquery.com/jquery-3.6.0.min.js"></script>
            <script>
              $("#copyurl").on('click',function(){
                var link = window.location.href;

                  var textarea = document.createElement('textarea');
                  textarea.value = link;
                  document.body.appendChild(textarea);
                  textarea.select();
                  document.execCommand('copy');
                  document.body.removeChild(textarea);
                  alert('链接已复制到剪贴板');
              })

              $(document).ready(function(){

                $('.item').on('click', function(event) {
                  event.preventDefault();
                  var currentUrl = window.location.href;
                  that=$(this);
                  $.ajax({
                    url: 'http://localhost:3000/check-port/9515',
                    type: 'GET', // JSONP只支持GET请求
                    dataType: 'jsonp', // 告诉jQuery我们期待返回的是JSONP格式的数据
                    jsonp: 'callback', // 告诉服务器我们的回调函数名（默认为'callback'）
                    jsonpCallback: 'myCustomCallback', // 自定义回调函数名（可选）
                    timeout: 2000,
                    success: function(data) {
                      var regex = /\/id\/(\d+)\.html/;
                      var match = currentUrl.match(regex);
                      var itemId;
                      if (match && match[1]) {
                        itemId = match[1];
                      }
                      if (data.portIsOpen) {
                        console.log('Port 9515 is open');
                            url = 'http://localhost:3000/creategoods?site=' + $(that).attr("data-site") + '&item_id=' + itemId
                            console.log(url);
                          fetch(url).then(response => response.json()).then(data => {

                          })
                      }
                    },
                    error: function(jqXHR, textStatus, errorThrown) {
                      console.log('Port 9515 is closed or unreachable');
                      var regex = /\/id\/(\d+)\.html/;
                      var match = currentUrl.match(regex);
                      var itemId;
                      if (match && match[1]) {
                        itemId = match[1];
                      }
                      window.open($(that).attr("data-action")+"?site"+ $(that).attr("data-site") + '&item_id=' + itemId,"");
                      // navigator.clipboard.writeText(currentUrl).then(function() {
                      //       debugger;
                      //      //window.open($(that).attr("data-action"), '_self');
                      //      this.location=$(that).attr("data-action")+"&site"+ $(that).attr("data-site") + '&item_id=' + itemId;
                      // }).catch(function(err) {
                      //
                      // });
                    }
                  })


                });
              });

            // 使用原生 JavaScript 获取元素并添加事件监听器
              document.querySelector('.item').addEventListener('click', function(event) {
                // 阻止链接的默认行为（即跳转）

              });
            </script>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 左侧相关商品 -->
    <div class="col-xs-3 padd0 marg-top "> 
      <!--店铺信息-->
      <div id="side-shop-info">
      <div class="shop-intro" style="">
        <h3 class="hd">
          <div class="name">
           <a data-spm="d4918065" class="shopLink" href="{:U('Store/index',array('store_id'=>$store['store_id']))}" target="_blank">{$store['store_name']}</a>
            <a href="http://wpa.qq.com/msgrd?v=3&uin={:store_qq($data['store_id'])}&site=qq&menu=yes"  target="_blank" id="J_qq" title="售后客服"><i class="icon icon-qq"></i></a>
            </div>
          <i></i> </h3>
        <div style="height: 0px; margin-top: 0px; margin-bottom: 0px; overflow: hidden; width: 146px;"></div>
        <!-- <div class="shop-cert shop-ages"> <span class="icon">3</span>
          <div class="text">3年老店</div>
        </div> -->
        <div class="btnArea">
        <a data-spm="d4918061" href="{:U('Store/index',array('store_id'=>$store['store_id']))}" target="_blank" class="enterShop">进店逛逛</a>
        <eq name="data.store_fav" value="1">
            <a id="xshop_collection_href" class="store_has_fav" data-id="{$store['store_id']}" href="javascript:;" > &nbsp; &nbsp;已收藏</a>
        <else />
            <a id="xshop_collection_href" class="store_add_fav" data-id="{$store['store_id']}" href="javascript:;" > &nbsp; &nbsp;收藏店铺</a>
        </eq>
        </div>
        
      </div>
      </div>
      <div class="item-relative">
        <div class="page-header">
          <h4>看过本商品的用户还购买过</h4>
        </div>
        <notempty name="data.relative">
          <ul>
            <volist name="data.relative" id="vo">
              <li> <a href="{:U('Item/detail', array('id' => $vo['id']))}" target="_blank"> <img src="__IMG__/img-pai-bg.png" data-url="{:get_image_thumb($vo['cover_path'], 300, 300)}"> </a>
                <h4 class="name"><a href="{:U('Item/detail', array('id' => $vo['id']))}" target="_blank">{$vo.name}</a></h4>
                <p class="price"> <span class="text-danger"><em class="yen">&yen;</em>{$vo.price}</span>
                  <if condition="C('IS_SHOW_BUYNUM')"><span class="pull-right text-info">已有{$vo.buynum}人购买</span></if>
                </p>
              </li>
            </volist>
          </ul>
          <else/>
          <p>暂无相关商品！</p>
        </notempty>
      </div>
    </div>
    
    <!-- 右侧商品详情 -->
    <div class="col-xs-9 " style="padding-right:0;">
      <div class="item-intro clearfix" style="margin-top:20px;"> 
        <!-- 商品详情tabs -->
        <ul class="nav nav-tabs" id="J_item_navtabs">
          <li class="active"><a href="#content" data-toggle="tab">商品介绍</a></li>
          <li><a href="#comment" data-toggle="tab">用户评价<span id="_plnub">({$data['comment_total']})</span></a></li>
          <!-- <li><a href="#account" data-toggle="tab">Account</a></li> --> 
          <!-- <li class="disabled"><a>Disabled</a></li> -->
        </ul>
        <notempty name="data.property.property_attribute"> 
          <!-- 商品参数 -->
          <div class="property" id="property">
            <div class="page-header">
              <h3>商品参数</h3>
            </div>
            <div class="row">
              <volist name="data.property.property_attribute" id="prp">
                <neq name="prp.info.0" value="">
                  <div class="col-xs-4"><span>{$prp.cname}：</span>
                    <notempty name="prp.info">
                      <volist name="prp.info" id="val">
                        <in name="prp.formtype" value="input,textarea"> 
                            <eq name="prop.ename" value="cpmc">{$val|msubstr=0,16,'utf-8'}</eq>
                            <neq name="prop.ename" value="cpmc">{$val}</neq>
                          <else/>
                            <eq name="prp.formtype" value="color">
                                <notempty name="val.item_pic"> <img src="{$val.item_pic}" alt="{$val['option']}" title="{$val['option']}" class="item_pic" />
                                <else/>
                                <notempty name="val.pic"> <img src="__ROOT__{$val.pic|get_cover='path'}" alt="{$val['option']}" title="{$val['option']}" />
                                <else/>
                                <i style="background:{$val['color']}"></i> </notempty>
                                </notempty>
                            </eq>
                            <eq name="prp.formtype" value="image"> <img src="__ROOT__{$val.pic|get_cover='path'}" alt="{$val['option']}" title="{$val['option']}" /> </eq>
                          {$val['option']}&nbsp; 
                        </in>
                      </volist>
                    </notempty>
                  </div>
                </neq>
              </volist>
            </div>
          </div>
        </notempty>
        <!-- 商品详情 -->
        <div class="content" id="content">
          <div class="page-header">
            <h3>商品详情</h3>
          </div>
          {$data.intro} </div>
        
        <!-- 用户评价 -->
        <div class="comment" id="comment">
          <div class="page-header">
            <h3>用户评价</h3>
          </div>
          <div class="list">
            <notempty name="data.comment">
            <volist name="data.comment" id="vo">
              <div class="list-item">
                <div class="media">
                  <div class="media-left">
                    <if condition="$vo['Member']"> <img class="media-object img-circle" src="<notempty name="vo.Member.avatar">{:get_image_thumb($vo['Member']['avatar'], 120, 120)}
                      <else/>
                      __IMG__/avatar-default.png
                      </notempty>
                      " onerror="this.src='__IMG__/avatar-default.png';" width="60">
                      <else />
                      <img class="media-object img-circle" src="<notempty name="vo.image">{:get_image_thumb(get_cover($vo['image'], 'path'), 120, 120)}
                      <else/>
                      __IMG__/avatar-default.png
                      </notempty>
                      " onerror="this.src='__IMG__/avatar-default.png';" width="60"> </if>
                  </div>
                  <div class="media-body">
                    <h4 class="media-heading" id="media-heading">
                      <if condition="$vo['Member']"> {$vo.Member.nickname|get_hidden_mobile}
                        <else />
                        {$vo.nickname} </if>
                      <small>{$vo.create_time|time_format}</small> </h4>
                    {$vo.content}
                    <notempty name="vo.reply">
                      <div class="media">
                        <div class="media-left"> <img class="media-object img-circle" src="__IMG__/logo-avatar.png" width="60" onerror="this.src='__IMG__/thumbnail.png'"> </div>
                        <div class="media-body">
                          <h4 class="media-heading">{$store['store_name']}回复<small> {$vo.reply.create_time|time_format}</small><a class="anchorjs-link" href="#nested-media-heading"><span class="anchorjs-icon"></span></a></h4>
                          {$vo.reply.content} </div>
                      </div>
                    </notempty>
                  </div>
                </div>
              </div>
            </volist>
            <else/>
            <div class="list-empty">刚刚上架的宝贝，还没有评论信息~</div>
            </notempty>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 浮动导航按钮 -->
    <div class="navbar navbar-default navbar-fixed-top item-navbar" id="J_fixed_navbar">
      <div class="container">
        <div class="navbar-header">
          <h4 class="name">{:get_short($data['name'], 16)}</h4>
        </div>
        <div class="navbar-collapse collapse navbar-responsive-collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#content">商品介绍</a></li>
            <li><a href="#comment">用户评价<span id="_plnub">({$data['comment_total']})</span></a></li>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <if condition="$data['seckill']">
              <h4 class="item name text-center J_seckill_time"> 秒杀活动已结束 </h4>
              <span class="item"><a href="javascript:;" class="pull-right btn btn-negative btn-positive disabled J_seckill_btn"><i class="icon icon-recharge"></i>立即抢购</a></span>
              <else />
              <gt name="data.stock" value="0"> <span class="price text-danger"><em class="yen">&yen;</em>{$data.price}元</span> <a href="javascript:;" class="pull-right btn btn-negative J_item_add2cart"><i class="icon icon-cart"></i>加入购物车</a>
                <else/>
                <span class="price text-danger"><em class="yen">&yen;</em>{$data.price}元</span> <a href="javascript:;" class="pull-right btn btn-negative disabled"><i class="icon icon-cart"></i>抱歉，卖光了……</a> </gt>
            </if>
          </ul>
        </div>
      </div>
    </div>

  </div>
  <!--弹出框 -->
  <div id="coupons-div" class="modal-dialog modal-box" style=" width: 700px; position: fixed; top:50%; left:50%; margin:-250px 0 0 -350px ;z-index:999 ;display:none" >
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close J_modal_close" data-dismiss="modal"><i class="icon icon-close"></i></button>
                <h4 class="modal-title">优惠券领取</h4>
            </div>
            <!-- 内容content -->
            <div class="fixed-coupon">
            <notempty name="coupons">
              <volist name="coupons" id="voo">
               <dl class="fixed-coupon-dl">
               <dt class="fixed-coupon-dt fl">
                <h2>满{$voo.norm}元立减{$voo.amount}</h2>
                <p>有效期：{$voo.expire_time|time_format}</p>
                <notempty name="voo.items">
                <p>说明：适用于本商品</p>
                <else />
                <p>说明：适用于本店铺</p>
                </notempty>
              </dt>
               <dd class="fixed-coupon-dd fr ">
                  <h2 class="text-<if condition='$key % 2 == 0'>danger"<else />orange"</if>><small class="text-<if condition='$key % 2 == 0'>danger"<else />orange"</if>>￥</small>{$voo.amount}</h2>
                  <a href="javascript:;" data-id="{$voo.id}" class="btn btn-get btn-<if condition='$key % 2 == 0'>positive"<else />orange"</if>>立即领取</a></dd>
               <dd class="fixed-coupon-line"><span></span><span class="fixed-coupon-spbottom"></span></dd>
               </dl>
              </volist>
              </notempty>
            </div>
        </div>
  </div>
  <div id="hidden-div" class="modal-backdrop fade in" style="width: 100%; z-index:1 ;display:none"></div>
</block>
<block name="script"> 
  <script type="text/javascript">

    window.onload = function(){
      $('#J_skubox_lists .J_sku_box').find('ul>li:first').click();
      var zone_out = "{$zone_out}";
      if(zone_out){
        $('.J_item_buynow').text('该地区暂时无货').removeClass("btn btn-block btn-positive J_seckill_btn J_item_buynow").attr('class',"btn btn-positive disabled");
      }
    }
    //规格组合对应的价格，数量值数组
    var spc_data_info = null;
    <notempty name="data.property.spc_data">
      spc_data_info = '{$data.property.spc_data}';
    </notempty>
    seajs.use(['item'], function(item){
      if({$data.stock} > 0){
        item.init(spc_data_info, {:json_encode($data['seckill'])});
      }else{
        item.init(spc_data_info, null);
      }
      //分销商品
      item.selectItem();
      item.deleteSpdItem();
    });
  </script> 
  <style>
  #side-shop-info {
	border-bottom: 1px solid #e5e5e5;
	 
}
.bacgfff{ background:#fff;}
.marg-top{ margin-top:20px}
#side-shop-info .shop-intro {
	background-color: #fff;padding-bottom:20px
}
#side-shop-info .hook-float {
	z-index: 999;
	border-left: 1px solid #e5e5e5!important;
	height: 49px!important;
	border-bottom: none!important
}
#side-shop-info .hook-float i {
	background-image: none!important;
	position: absolute;
	right: 12px;
	top: 20px;
	display: block;
	width: 0;
	height: 0;
	border-style: solid;
	border-color: #bbb transparent transparent;
	border-width: 5px;
	font-family: arial
}
#side-shop-info .shop-intro-float {
	position: fixed;
	z-index: 999;
	top: 0;
	box-shadow: rgba(0,0,0,.1) 0 1px 5px 0;
	padding-bottom: 15px
}
#side-shop-info .shop-intro-float i {
	top: 15px;
	border-color: transparent transparent #bbb
}
#side-shop-info .hd {
	padding: 0 0 0 15px;
	height: 55px;
	line-height: 55px;
	background-color: #fafafa;
	border-bottom: 1px solid #e5e5e5; margin:0;
}
#side-shop-info .hd .shopLink {
	color: #333;
	font-size: 12px
}
#side-shop-info .shop-cert {
	overflow: hidden;
	zoom: 1;
	width: 130px;
	margin: 10px auto 5px
}
#side-shop-info .shop-cert .text {
	font-size: 12px;
	color: #999;
	float: left;
	font-weight: 700
}
#side-shop-info .shop-cert .icon, #side-shop-info .shop-cert .icon:hover {
	text-decoration: none;
	float: left
}
#side-shop-info .shop-3c .text {
	padding: 5px 0 0
}
#side-shop-info .shop-3c .icon {
	background-image: url(//img.alicdn.com/tps/i4/T1tumbFaBgXXb84OIo-320-192.png);
	background-image: url(//img.alicdn.com/tps/i1/T1mNabFc0hXXcViZ_c-150-90.png)\9;
	zoom: 1;
	width: 30px;
	height: 30px;
	background-position: -3px -150px;
	background-size: 150px 90px;
	float: left
}
#side-shop-info .shop-house .icon {
	background-image: url(//img.alicdn.com/tps/i3/T1SZU0XhJbXXcu5FDa-20-20.png);
	zoom: 1;
	width: 20px;
	height: 20px
}
#side-shop-info .shop-yc .icon {
	background-image: url(//img.alicdn.com/tps/i2/T1sxXrXqdgXXcu5FDa-20-20.png);
	zoom: 1;
	width: 20px;
	height: 20px
}
#side-shop-info .shop-ages .icon {
	margin-left: 3px;
	margin-right: 8px;
	background-color: #f04343;
	color: #ffd800;
	text-align: center;
	zoom: 1;
	width: 18px;
	height: 18px
}
#side-shop-info .main-info {
	overflow: hidden;
	width: 130px;
	margin: 0 auto;
	cursor: pointer;
	position: relative
}
#side-shop-info .main-info .shopdsr-item {
	float: left;
	color: #999;
	width: 36px;
	height: 36px;
	margin: 15px 7px 0 0;
	position: relative
}
#side-shop-info .main-info .shopdsr-title {
	text-align: center;
	font-family: "\5b8b\4f53"
}
#side-shop-info .main-info .shopdsr-score {
	color: #c40000;
	padding-left: 5px;
	height: 18px;
	width: 31px;
	position: relative;
	overflow: hidden
}
#side-shop-info .main-info .shopdsr-score-up {
	color: #c40000;
	background: 0 0;
	text-decoration: none;
	height: 9px;
	width: 8px;
	right: 2px;
	top: 5px;
	position: absolute
}
#side-shop-info .main-info .shopdsr-score-up:before {
	content: "\e608";
	font-size: 12px;
	font-family: tm-detail-font;
	position: absolute;
	left: -2px;
	top: -4px
}
#side-shop-info .main-info .shopdsr-score-down-ctrl {
	color: #1f7700
}
#side-shop-info .main-info .shopdsr-score-down {
	color: #1f7700;
	background: 0 0;
	text-decoration: none;
	height: 9px;
	width: 10px;
	right: 2px;
	top: 5px;
	position: absolute
}
#side-shop-info .main-info .shopdsr-score-down:before {
	content: "\e604";
	font-size: 12px;
	font-family: tm-detail-font;
	position: absolute;
	left: -2px;
	top: -4px
}
#side-shop-info .main-info .shopdsr-score-equal {
	color: #c40000;
	background: 0 0;
	text-decoration: none;
	height: 9px;
	width: 8px;
	right: 2px;
	top: 5px;
	position: absolute
}
#side-shop-info .main-info .shopdsr-score-equal:before {
	content: "\e611";
	font-size: 12px;
	font-family: tm-detail-font;
	position: absolute;
	left: -2px;
	top: -4px
}
#side-shop-info .btnArea {
	overflow: hidden;
	margin: 15px auto 0; line-height:38px;
	width: 150px
}
#side-shop-info .btnArea .enterShop, #side-shop-info .btnArea .favShop {
	float: left;
	width: 80px;
	height: 36px;
	line-height: 36px;
	text-align: center
}
#side-shop-info .btnArea .enterShop, #side-shop-info .btnArea .enterShop:hover {
	text-decoration: none;
	border: 1px solid #333;
	background-color: #333;
	color: #fff
}
#side-shop-info .btnArea .favShop {
	float: right;
	text-decoration: none;
	background-color: #f5f5f5;
	border: 1px solid #ccc;
	color: #333
}
#J_DcShopArchive {
	height: auto!important
}
#side-shop-info .shopCertificate {
	position: relative;
	background: #B32FF2!important;
	color: #fff;
	font-size: 14px;
	padding: 0;
	text-align: center
}
  </style>
</block>
